<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加学生</title>
    <style>
        table{
            border-collapse:collapse;
        }
        td:first-child{
            text-align: right;
        }
        tr:last-child{
            text-align: center;
        }
    </style>
</head>
<body>
<form action="{% url 'myapp:myapp_add' %}" method="post">
    {% csrf_token %}
    <table border="1">
        <tr>
            <td>学生姓名：</td>
            <td><input type="text" name="name"></td>
        </tr>
        <tr>
            <td>性别：</td>
            <td><input type="radio" name="sex" value="1">男
                <input type="radio" name="sex" value="0">女
            </td>
        </tr>
        <tr>
            <td>学生班级</td>
            <td>
                <select name="class_id" id="">
                    {% for i in class %}
                    <option value="{{ i.0 }}">{{ i.1 }}</option>
                    {% endfor %}
                </select>
            </td>
        </tr>
        <tr>
            <td>学生分数：</td>
            <td><input type="text" name="score"></td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" value="添加"></td>
        </tr>

    </table>

    <br>

</form>
</body>
</html>